package com.easyapi.server.job;

import com.easyapi.common.annotation.JobLogging;
import com.easyapi.server.service.api.ApiService;
import org.springframework.core.annotation.Order;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

/**
 * @author javadadi
 */
@Component
@Order(2)
public class ApiInfoJob {
    @Resource
    private ApiService apiService;

    @JobLogging
    @Scheduled(cron = "0 22 12 * * *")
    @PostConstruct
    public void init() {
        apiService.initInterfaceConfig();
    }
}
